package sch.frog.creational.prototype;

import sch.frog.creational.prototype.model.ObjA;
import sch.frog.creational.prototype.model.ObjB;
import sch.frog.creational.prototype.model.ObjC;

public class PrototypeDemoT {

    public static void main(String[] args){
        ObjB b = new ObjB();
        b.setObjA(new ObjA());
        ObjB bb = b.clone();
        System.out.println(b == bb);
        System.out.println(b.getObjA() == bb.getObjA());


        ObjC c = new ObjC();
        c.setObjA(new ObjA());
        ObjC cc = c.clone();
        System.out.println(c == cc);
        System.out.println(c.getObjA() == cc.getObjA());
    }
}
